package edu.fudan.jwxt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
@TableName("course_teacher_request")
public class CourseTeacherRequest {
    @TableId(value = "auto_increment_key",type = IdType.AUTO)
    private Integer autoIncrementKey;
    private String courseId;
    private String courseName;  //课程名称
    private String teacherId;   //开课老师工号
    private Integer collegeId;   //所属专业类别
    private String courseNumbering;
    private String hours;
    private String credits;
    private String introduction;
    private String courseTime;
    private String coursePlace;
    private String capacity;
    private String operation="insert";
    private Integer majorId;
    private String exactClassTimeString;

    @TableField(exist = false)
    List<String> exactClassTime;

    public CourseTeacherRequest(){
        courseName="";
        teacherId="222222";
        collegeId=0;
        courseNumbering="";
        hours="1000";
        credits="";
        introduction="";
        courseTime ="";
        coursePlace ="";
        capacity="";
        majorId=0;
        exactClassTimeString="";
    }

    public CourseTeacherRequest(CourseTeacherRequest courseTeacherRequest){
        autoIncrementKey=courseTeacherRequest.getAutoIncrementKey();
        courseId=courseTeacherRequest.getCourseId();
        courseName=courseTeacherRequest.getCourseName();  //课程名称
        teacherId=courseTeacherRequest.getTeacherId();   //开课老师工号
        collegeId= courseTeacherRequest.getCollegeId();   //所属专业类别
        courseNumbering=courseTeacherRequest.getCourseNumbering();
        hours=courseTeacherRequest.getHours();
        credits=courseTeacherRequest.getCredits();
        introduction=courseTeacherRequest.getIntroduction();
        courseTime =courseTeacherRequest.getCourseTime();
        coursePlace = courseTeacherRequest.getCoursePlace();
        capacity=courseTeacherRequest.getCapacity();
        operation=courseTeacherRequest.getOperation();
        majorId= courseTeacherRequest.getMajorId();
        exactClassTimeString=courseTeacherRequest.getExactClassTimeString();
    }

}
